<template>
  <div>
<!--        <mavon-editor
            class="md"
            v-model="this.htmlMD"
            :subfield = "false"
            :defaultOpen = "'preview'"
            :toolbarsFlag = "false"
            :editable="false"
            :scrollStyle="true"
            :ishljs = "true"
        ></mavon-editor>
      :value="detailContent.content"：引入要转换的内容
      :subfield = "false"：开启单栏模式
      :defaultOpen = "'preview'"：默认展示预览区域
      :toolbarsFlag = "false"：关闭工具栏
      :editable="false"：不允许编辑
      scrollStyle="true"：开启滚动条样式(暂时仅支持chrome)
      :ishljs = "true"：开启代码高亮-->
    <v-md-editor v-model="this.content"
                 mode="preview"
                 @copy-code-success="handleCopyCodeSuccess"
    ></v-md-editor>

  </div>
</template>

<script>

export default {
  name: "MDViews",

  data() {
    return {
      content: '',
    }
  },
  methods: {
    initBlog() {
      this.content = JSON.parse(window.sessionStorage.getItem("thisBlog")).content
    },
    handleCopyCodeSuccess(code){
      console.log(code);
    },
  },
  mounted() {
    this.initBlog()
  },
}
</script>

<style scoped>

</style>